<%@page isELIgnored="false" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<style type="text/css">
.article {
	border: red 1px solid;
}
.article .title {
	text-align: center;
}
.article .desc {
	text-align: center;
}
.message {
	border: red 1px solid;
}
.comment {
	border: red 1px solid;
	margin-left: 50px;
}
</style>

<div class="article">
	<div class="title">${article.title}</div>
	<div class="desc"><fmt:formatDate value="${article.dateline}" pattern="yyyy-MM-dd HH:mm"/></div>
	<div class="content">${article.content.value}</div>
</div>

<span><a name="comment">评论</a></span>
<c:forEach var="message" items="${messages}" varStatus="s">
	<div class="message">
		<span>${s.index + 1}. Post by <a href="${message.url }">${message.name }</a> @ ${message.dateline }<a href="#">回复</a></span>
		<p>${message.content.value }</p>
		<c:forEach var="comment" items="${message.comments}" varStatus="vs">
			<div class="comment">
				<p>${vs.index + 1}. Post by <a href="${comment.url }">${comment.name }</a> @ ${comment.dateline }</p>
				<p>${comment.content.value }</p>
			</div>
		</c:forEach>
	</div>
</c:forEach>